package v1

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func textToPinyin(c *gin.Context) {
	var textToPinyinModel TextToPinyinModel
	_ = c.ShouldBindJSON(&textToPinyinModel)
	res := getTextToPinyin(textToPinyinModel.Str)
	c.JSON(http.StatusOK, gin.H{
		"code": 200,
		"msg":  res,
	})
}
